package com.sluggard.ai.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 类描述：
 *
 * @author lizheng
 * @created 2025/4/22 17:14
 */
@Controller
@RequestMapping
public class PageController {

    @GetMapping("/")
    public String home(Model model) {
        model.addAttribute("activeMenu", "assistant");
        model.addAttribute("contentPage", "pages/assistant");
        return "index";
    }

    @GetMapping(value = "/knowledge")
    public String knowledge(Model model){
        model.addAttribute("activeMenu", "knowledge");
        model.addAttribute("contentPage", "pages/knowledge");
        return "index";
    }

    @GetMapping(value = "/knowledgeFile")
    public String knowledgeFile(Model model){
        model.addAttribute("activeMenu", "knowledgeFile");
        model.addAttribute("contentPage", "pages/knowledge_file");
        return "index";
    }
}
